package org.speed.dubbo.spi;

import java.util.List;
import java.util.ServiceLoader;

import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.rpc.Filter;
import org.speed.dubbo.spi.service.RpcService;


/**
 * Hello world!
 */
public class App 
{
    public static void main( String[] args )
    {
    	
    	//ServiceLoader<S>
    	//RpcService order = ExtensionLoader.getExtensionLoader(RpcService.class).getExtension("order");
    	//order.run("netty");
    	
    	//RpcService pay = ExtensionLoader.getExtensionLoader(RpcService.class).getExtension("pay");
    	//pay.run(null);
    	
    	//AdaptiveClassCodeGenerator
    	
    	
    
			//User user = (User) Class.forName("org.speed.dubbo.spi.User").newInstance();
			//System.out.println(user.toString());
			
			//ClassLoader loader = App.class.getClassLoader().getParent();
			//System.out.println(user.toString());

    		URL url = new URL("dubbo","127.0.0.1",2181);
    		url = url.addParameter("value", "accesslog");
			List<Filter> list = ExtensionLoader.getExtensionLoader(Filter.class).getActivateExtension(url , "value");
    		System.out.println(list.size());
    		
    		
		
    	
    	
    }
}
